home *** CD-ROM | disk | FTP | other *** search
- From: "Paul D. DeRocco" <pderocco@ix.netcom.com>
- Message-ID: <3125C1DC.35AE@ix.netcom.com>
- X-Original-Date: Sat, 17 Feb 1996 06:54:04 -0500
- Path: in1.uu.net!bounce-back
- Date: 17 Feb 96 12:28:43 GMT
- Approved: fjh@cs.mu.oz.au
- Organization: -
- Newsgroups: comp.std.c++
- X-Mailer: Mozilla 2.0b6a (Win95; I)
- Subject: Numeric literal formats
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBFAgUBMSXKC+EDnX0m9pzZAQFqKAF8C7Hczr/GQokrVzKk7/8V/1Kw3Z5ARI9v
- 4nM8CRUnz84mD7b9KAJbKl9p4q077GoD
- =g247
-
- Why, oh why, aren't we allowed to write binary numbers in C++? The
- standard could trivially be extended by allowing binary numbers to be
- written, prefixed with 0b, or perhaps 0y. This makes bit masks _much_
- easier to read. And it wouldn't break any presently legal program.
-
- Another related improvement would be to allow embedded underscores in
- numbers, for clarity. 1_000_000_000 is obviously a billion, while
- 1000000000 is not so obviously a billion. Same for 0x8000_0000, or
- 0y0001_1110_0000_0000. Again, it doesn't break anything.
-
- Oh heck, I might as well throw this in. Why isn't there an escape for
- escape? That is, why can't \e be defined as \x1B, since it's such a
- common control character?
-
- --
-
- Ciao,
- Paul D. DeRocco
- ---
- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
- Contact address: std-c++-request@ncar.ucar.edu. Moderation policy:
- http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
-